package com.sacfa.rrhh.sql;

public class EmpleadoSQL {
	public static final String SELECT_ONE;
    public static final String SELECT_ALL;
    public static final String INSERT;
    public static final String UPDATE;
    public static final String STATUS_CHANGE;
    
    static {
        StringBuilder qryBuilder = new StringBuilder();

        qryBuilder.append("SELECT * FROM Empleado WHERE Nombre = ? AND ApellidoPaterno = ?");
        SELECT_ONE = qryBuilder.toString();

        qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT * FROM Empleado");
        SELECT_ALL = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("INSERT INTO Empleado VALUES(null, ?, ?, ?, ?, ?, ?, ?, ?)");
        INSERT = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE Empleado set Nombre = ?, ApellidoPaterno = ?, ApellidoMaterno = ?, ");
        	qryBuilder.append("Puesto = ?, RFC = ?, SalarioXHora = ?, Estatus = ?, Direccion = ? ");
        	qryBuilder.append("WHERE idEmpleado = ?");
        UPDATE = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE Empleado set Estatus = ? WHERE idEmpleado = ?");
        STATUS_CHANGE = qryBuilder.toString();
    }
}
